home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / applic / ntp / acts.zoo / nbstime.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-15  |  2.0 KB  |  58 lines

  1. /*
  2.         include file nbstime.h
  3.  
  4.         this file is used to define the constants
  5.         that govern the compilation of program NBSTIME.
  6.  
  7.         if the constant IBMPC is defined then the
  8.         program is intended to run on an IBM-PC
  9.         (or equivalent machine) under MSDOS.
  10.  
  11.         if the constant SUN is defined then the
  12.         program is intende to run on a SUN work
  13.         station.  This version is as non-specific
  14.         as possible so that it should run with only
  15.         minor modifications in other unix environments.
  16. */
  17. #define IBMPC  1
  18. /* #define SUN   1 */
  19. /*
  20.         There are two MSDOS versions of the program:
  21.  
  22.         if the constant BIOS is defined, then the
  23.         program will access the RS-232 port via calls
  24.         to the system BIOS.
  25.  
  26.         if the constant BIOS is not defined, then the
  27.         program uses direct input/output via inport and outport.
  28.  
  29.         if the following line is not a comment, then input/output
  30.         will be done via calls to the BIOS.
  31. */
  32. /*      #define BIOS 1   */
  33. /*
  34.         if IBMPC is defined, then an MSDOS version is being
  35.         generated.  In that case, if direct input/output is
  36.         to be used, the following constants define the
  37.         offsets from the port address for the various
  38.         registers of the rs-232 device.
  39. */
  40. #ifdef IBMPC
  41. #include <conio.h>
  42. #define inportb inp
  43. #define outportb outp
  44. #define MSC 1            /* set for Microsoft C */
  45. #ifndef BIOS
  46. #define txbuf  0        /* transmit buffer offset */
  47. #define rxbuf  0        /* receiver buffer offset */
  48. #define divlsb 0        /* divisor latch, low part */
  49. #define divmsb 1        /* divisor latch, high part */
  50. #define intena 1        /* interrupt enable register */
  51. #define intid  2        /* interrupt ident. register */
  52. #define lcreg  3        /* line control register */
  53. #define modreg 4        /* modem control register */
  54. #define lsreg  5        /* line status register   */
  55. #define msreg  6        /* modem status register  */
  56. #endif
  57. #endif
  58.